import SwiftUI

struct SearchFoodStoreView: View {
    
    @State var searchContent: String
    
    @Environment(Router.self) private var router
    @Environment(LocationService.self) var locationService
    
    var body: some View {
        VStack {
            Text("搜索店铺")
                .foregroundStyle(.fs191919)
                .font(.alibabaPuHuiTi(size: 16.0, weight: .semiBold))
                .padding(.vertical, 16.0)
            SearchView(searchContent: $searchContent, searchAction: {})
                .padding(.horizontal, 8.0)
            FoodStoreListView(searchContent: searchContent)
        }
        .background(Color.fsF5F5F5)
        .overlay(alignment: .topLeading) {
            Button {
                router.pop()
            } label: {
                RoundBackButton(bgColor: .white)
            }
            .padding(.leading, 12.0)
            .padding(.top, 8.0)
        }
        .navigationBarHidden(true)
    }
}

#Preview {
    SearchFoodStoreView(searchContent: "")
        .environment(Router())
}
